package be.kdg.bombermanunlimited.server.objects.finalclasses;

import be.kdg.bombermanunlimited.server.objects.interfaces.IBomb;
/**
 * implementatie van IBomb. alles spreekt voor zich.
 * @author pieter
 *
 */
public class Bomb implements IBomb {

	private int range;
	private long timeToLive =  2000 ;
	private long time;
	private int row, column;
	

	public Bomb(int row, int column, int range) {
		this.range = range;
		this.time = System.currentTimeMillis();
		this.row= row;
		this.column= column;
	}

	public int getRange() {
		return this.range;
	}
	
	public int getRow() {
		return row;
	}
	
	public int getColumn() {
		return column;
	}
	
	public boolean isBlownUp() {
		return ((System.currentTimeMillis()- timeToLive) > this.time);
	}

	public boolean explode() {
		if (System.currentTimeMillis()- this.time > timeToLive) {
			return true;
		}
		return false;
	}
}
